- 
                Notifications
    You must be signed in to change notification settings 
- Fork 297
          RFC: Remove custom __deepcopy__ method from DimCoord
          #6766
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
It causes a RecursionError under python 3.14 as the super() proxy object is now copied, instead of its copy implementation being used. This change does lose the read-only latching on copy that DimCoords currently have. Fixes SciTools#6762
__deepcopy__ method from DimCoord
      | Unsurprisingly this broke the tests that were testing for it.  | 
| From @SciTools/peloton: Although this obviously is a problem, we're worried that deleting  This would also need to be tested against 3.14 (our CI doesn't cover this currently). | 
| As a short term workaround, it might be worth rebuilding the conda-forge package so it explicitly doesn't support python 3.14, as currently environments that don't pin the python version are broken. | 
| 
 Why conda-forge but not PyPI? | 
| Only because I forgot people install things from PyPI. | 
| 
 Well unfortunately this makes the situation more complicated, since the only way to update PyPI is via a full-on patch release within the Iris GitHub. Since we offer semantic versioning - critical to supporting operational use cases - this involves careful branch management. Our What's New process is not optimised for such light-footed releases either, so that's something to improve in future. And of course we would potentially need to do it all again once Iris has been made compatible (depending on the situation). Given the frequency of incompatible changes in our dependencies, this would represent an enormous distraction and a significant threat to productivity. I'm not willing to put the team through that. | 
| The conda-forge package can be updated in just the feedstock by specifying  However, like you say, it might not be worth it, as it would take someone's time, the change would have to be put back once it was fixed, and users can always specify their python version explicitly when creating their environment. At least this issue fails completely, rather than subtly, so users will know there is an issue. | 
| 
 Are you sure? I am pretty sure I have had Pip both install dependencies and catch incompatibilities before. Have I misunderstood? If we adopted a policy of letting PyPI 'go out of date' between minor releases then I agree this becomes trivially easy. I had assumed that the clear answer to this is "No", but the cost-benefit might say otherwise. | 
| By "pip won't be managing python versions", I mean that you can't install python itself through pip, so you will have had to explicitly install python 3.14 to be affected. Most stable distributions or existing installations will have an older version of python, so won't be affected. As an excuse to learn the PyPI BigQuery API I've run the numbers: 
 Therefore, while these download numbers are only approximately comparable1, it indicates that most of iris's downloads are via PyPI, and thus that probably sways the cost-benefit analysis towards not changing anything. Footnotes
 | 
🚀 Pull Request
Description
Currently a request for comment, as there is probably a better way to fix this, and I've not done all the checklist stuff yet.
The custom copy implementation for DimCoords causes a RecursionError under python 3.14 as the super() proxy object is now copied, instead of its copy implementation being used on the original object.
This change does lose the read-only latching on copy that DimCoords currently have, which is what makes me think there is a better way. On the other hand, is the DimCoord not being created with read-only points coordinates?
Fixes #6762
Consult Iris pull request check list
Add any of the below labels to trigger actions on this PR: